Imports Spring.Context
Imports Spring.Context.Support

Public Class BaseDominio
    Implements IRepositorio

    Private _id As Nullable(Of Long)
    Public Overridable Property Id() As Nullable(Of Long)
        Get
            Return _id
        End Get
        Set(ByVal value As Nullable(Of Long))
            _id = value
        End Set
    End Property

    Private _repositorio As IRepositorio
    Protected Overridable Property Repositorio() As IRepositorio
        Get
            Return _repositorio
        End Get
        Set(ByVal value As IRepositorio)
            _repositorio = value
        End Set
    End Property

    Public Sub New()
        'Console.WriteLine("Injecting")
        Dim _contextoDoSpring As IApplicationContext = ContextRegistry.GetContext()
        Dim _repositorio As IRepositorio

        _repositorio = DirectCast(_contextoDoSpring("Financeiro.Repositorio"), IRepositorio)
        Me.Repositorio = _repositorio

    End Sub

#Region "Classes Injetadas"


    'FIM
Protected Overridable Property EmpresaProprietariaDao() As IEmpresaProprietariaDao Implements IRepositorio.EmpresaProprietariaDao
    Get
        Return Me.Repositorio.EmpresaProprietariaDao
    End Get
    Set(ByVal value As IEmpresaProprietariaDao)

    End Set
End Property


Protected Overridable Property DependenciaDao() As IDependenciaDao Implements IRepositorio.DependenciaDao
    Get
        Return Me.Repositorio.DependenciaDao
    End Get
    Set(ByVal value As IDependenciaDao)

    End Set
End Property



    Protected Overridable Property EnderecoDao() As IEnderecoFinanceiroDao Implements IRepositorio.EnderecoDao
        Get
            Return Me.Repositorio.EnderecoDao
        End Get
        Set(ByVal value As IEnderecoFinanceiroDao)

        End Set
    End Property


Protected Overridable Property AReceberDao() As IAReceberDao Implements IRepositorio.AReceberDao
    Get
        Return Me.Repositorio.AReceberDao
    End Get
    Set(ByVal value As IAReceberDao)

    End Set
End Property


Protected Overridable Property ParcelaDao() As IParcelaDao Implements IRepositorio.ParcelaDao
    Get
        Return Me.Repositorio.ParcelaDao
    End Get
    Set(ByVal value As IParcelaDao)

    End Set
End Property




#End Region

End Class
